<layout name="layout"/>
<include file="Public:angular"/>
<script style="javascript">
App.controller("Appctrl",["$scope","$http",function($scope,$http){
	//订单历史
	$scope.showhistory=function(url){
		$http.get(url)
		.success(function(response){
			console.log(response);
			$scope.order_history=response;
			UIkit.modal("#myModal").show();
		}).error(function(response){
			UIkit.modal.alert(response);
		})		
	}
}])	
</script>	
<include file="searchbox"/>
<include file="Public/searchcon"/>

<div ng-controller="Appctrl"  class="uk-overflow-container" >
            <table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">
	<thead>
		<th>#</th>		<th>订单金额</th>		<th>信用卡类型</th><th>订单时间</th><th>订单状态</th>		<th>商户ID</th>
		<th>顾客email</th>
	</thead>
	<tbody>
		<volist name="list" id="vo">
		<tr>
			<td>
			
				<a href="__CONTROLLER__/details/{$vo.order_id}">{$vo.order_id}</a>
			<!-- This is the container enabling the JavaScript -->
<div class="uk-button-dropdown" data-uk-dropdown="{mode:'click',pos:'bottom-left'}">
    <!-- This is the element toggling the dropdown -->
<a class="uk-icon-hover uk-icon-caret-down"></a>
    <!-- This is the dropdown -->
    <div class="uk-dropdown">
<ul class="uk-list uk-list-line">
<li>商户订单ID：{$vo.mh_oid}</li>
<li>IPS_ID：{$vo.ips_id}</li>
<li>记账金额：{$vo.base_amount}</li>
<li>通道金额：{$vo.gateway_amount}&nbsp;{$vo.gateway_currency}</li>
<li>国家：{$vo.bill_country}</li>
<li>IP：{$vo.order_source_ip}</li>
<li>网站：{$vo.site_id}</li>
<li>通道ID：{$vo.order_channel}</li>
<li>交易费率：{$vo.order_process_rate}</li>
<li>顾客姓名：{$vo.bill_firstname}&nbsp;{$vo.bill_lastname}</li>
</ul>
	</div>
</div>				
<a href="javascript:void(0)" onclick='openwin("__MODULE__/Inotice/index/in_oid/{$vo.order_id}")' class="uk-icon-hover uk-icon-bell"></a>
			</td>
			<td>{$vo.order_amount}{$vo.order_currency}
			</td>
			<td>{$vo.card_type}</td><td>
			{$vo.order_time}</td><td>{$vo.order_status|order_status=true}
			<br>
			<a href="javascript:void(0)" ng-click="showhistory('__MODULE__/Orders/orderhistory_qry/order_id/{$vo.order_id}')" class="uk-icon-history"></a>
			</td><td>
			<a href="javascript:void(0)" onclick='openwin("__MODULE__/Merchant/details/{$vo.order_mid}")'> {$vo.order_mid}</a>
			</td>
			<td>{$vo.bill_email}</td>
		</tr>
		</volist>
	</tbody>
</table>


<!-- Modal -->
<div class="uk-modal" id="myModal">
<div class="uk-modal-dialog uk-modal-dialog-large"> <a class="uk-modal-close uk-close"></a>
<div class="uk-modal-header">{$Think.lang.order_history}</div>

<table class="uk-table">
<tr><td width=120>{$Think.lang.add_time}</td>
<td width=120>记账金额({$web_config.web_currency})</td><td>原始金额</td><td>通道金额</td><td width=120>订单状态</td><td>备注</td>
</tr>
<tr ng-repeat="item in order_history"><td>{{item.oh_time}}</td>
<td>{{item.oh_amount}}</td>
<td>{{item.oh_origin_amount}}</td>
<td>{{item.oh_gateway_amount}}</td>
<td>{{item.oh_status}}</td><td>{{item.oh_remark}}</td>
</tr>
</table>

</div>
</div>

</div>
{$page}


